package com.adcc.loadsheet.monitor.vo;

import com.adcc.loadsheet.monitor.entity.MonitorStatus;
import com.adcc.loadsheet.monitor.entity.WebsiteMonitor;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.google.common.base.Strings;

public class WebsiteMonitorVO extends BaseVO<WebsiteMonitor> {

    // 地服网址url1
    private String url1;

    // 地服网址连接状态1
    private boolean connectStatus1;

    // 地服网址url2
    private String url2;

    // 地服网址连接状态2
    private boolean connectStatus2;
    // 地服网址状态
    private MonitorStatus status;

    public WebsiteMonitorVO() {

    }

    public WebsiteMonitorVO(WebsiteMonitor websiteMonitor) {
        url1 = Strings.nullToEmpty(websiteMonitor.getUrl1());
        connectStatus1 = websiteMonitor.isConnectStatus1();
        url2 = Strings.nullToEmpty(websiteMonitor.getUrl2());
        connectStatus2 = websiteMonitor.isConnectStatus2();
        status = websiteMonitor.getStatus();
    }

    public String getUrl1() {
        return url1;
    }

    public void setUrl1(String url1) {
        this.url1 = url1;
    }

    public boolean isConnectStatus1() {
        return connectStatus1;
    }

    public void setConnectStatus1(boolean connectStatus1) {
        this.connectStatus1 = connectStatus1;
    }

    public String getUrl2() {
        return url2;
    }

    public void setUrl2(String url2) {
        this.url2 = url2;
    }

    public boolean isConnectStatus2() {
        return connectStatus2;
    }

    public void setConnectStatus2(boolean connectStatus2) {
        this.connectStatus2 = connectStatus2;
    }

    public MonitorStatus getStatus() {
        return status;
    }

    public void setStatus(MonitorStatus status) {
        this.status = status;
    }

    @Override
    public WebsiteMonitor toEntity() {
        return null;
    }

    @Override
    public String toJSON() throws JsonProcessingException {
        return null;
    }
}
